package com.backend.aptromview.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.backend.aptromview.mapper.AptromViewMapper;
import com.backend.aptromview.domain.AptromView;
import com.backend.aptromview.service.IAptromViewService;
import org.springframework.transaction.annotation.Transactional;

/**
 * 公寓图片管理Service业务层处理
 * 
 * @author fusi
 * @date 2024-10-06
 */
@Service
public class AptromViewServiceImpl implements IAptromViewService 
{
    @Autowired
    private AptromViewMapper aptromViewMapper;

    @Override
    public AptromView selectAptromViewByApartmentIncludeRoomId(Long apartmentIncludeRoomId)
    {
        return aptromViewMapper.selectAptromViewByApartmentIncludeRoomId(apartmentIncludeRoomId);
    }

    @Override
    public List<AptromView> selectAptromViewList(AptromView aptromView)
    {
        return aptromViewMapper.selectAptromViewList(aptromView);
    }

    @Override
    @Transactional
    public int insertAptromView(AptromView aptromView)
    {
        int a = aptromViewMapper.insertApartmentIncludeRoom(aptromView);
        return a>0?a:0;
    }
    @Override
    @Transactional
    public int updateApartmentIncludeRoom(AptromView aptromView)
    {
        int a = aptromViewMapper.updateApartmentIncludeRoom(aptromView);
        return a>0?a:0;
    }
    @Override
    public int deleteAptromViews(Long[] apartmentIncludeRoomIds)
    {
        return aptromViewMapper.deleteAptromViewByApartmentIds(apartmentIncludeRoomIds);
    }

}
